// vite.config.ts
import { loadEnv } from "file:///C:/Users/14179/Desktop/xiaoyu/vue3/xiaoyuhdcustomer/node_modules/.pnpm/vite@5.3.3_@types+node@18.19.17_sass@1.71.1/node_modules/vite/dist/node/index.js";
import path, { resolve } from "path";
import vue from "file:///C:/Users/14179/Desktop/xiaoyu/vue3/xiaoyuhdcustomer/node_modules/.pnpm/@vitejs+plugin-vue@4.6.2_vite@5.3.3_vue@3.4.27/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import vueJsx from "file:///C:/Users/14179/Desktop/xiaoyu/vue3/xiaoyuhdcustomer/node_modules/.pnpm/@vitejs+plugin-vue-jsx@3.1.0_vite@5.3.3_vue@3.4.27/node_modules/@vitejs/plugin-vue-jsx/dist/index.mjs";
import { createSvgIconsPlugin } from "file:///C:/Users/14179/Desktop/xiaoyu/vue3/xiaoyuhdcustomer/node_modules/.pnpm/vite-plugin-svg-icons@2.0.1_vite@5.3.3/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import svgLoader from "file:///C:/Users/14179/Desktop/xiaoyu/vue3/xiaoyuhdcustomer/node_modules/.pnpm/vite-svg-loader@5.1.0_vue@3.4.27/node_modules/vite-svg-loader/index.js";
import UnoCSS from "file:///C:/Users/14179/Desktop/xiaoyu/vue3/xiaoyuhdcustomer/node_modules/.pnpm/unocss@0.58.5_postcss@8.4.39_vite@5.3.3/node_modules/unocss/dist/vite.mjs";
var __vite_injected_original_dirname = "C:\\Users\\14179\\Desktop\\xiaoyu\\vue3\\xiaoyuhdcustomer";
var vite_config_default = (configEnv) => {
  const viteEnv = loadEnv(configEnv.mode, process.cwd());
  const { VITE_PUBLIC_PATH } = viteEnv;
  return {
    /** 打包时根据实际情况修改 base */
    base: VITE_PUBLIC_PATH,
    resolve: {
      alias: {
        /** @ 符号指向 src 目录 */
        "@": resolve(__vite_injected_original_dirname, "./src")
      }
    },
    server: {
      /** 设置 host: true 才可以使用 Network 的形式，以 IP 访问项目 */
      host: true,
      /** 端口号 */
      port: 8001,
      /** 是否自动打开浏览器 */
      open: false,
      /** 跨域设置允许 */
      cors: true,
      /** 端口被占用时，是否直接退出 */
      strictPort: true,
      /** 接口代理 */
      /** 预热常用文件，提高初始页面加载速度 */
      warmup: {
        clientFiles: ["./src/layout/**/*.vue"]
      }
    },
    build: {
      /** 单个 chunk 文件的大小超过 2048KB 时发出警告 */
      chunkSizeWarningLimit: 2048,
      /** 禁用 gzip 压缩大小报告 */
      reportCompressedSize: false,
      /** 打包后静态资源目录 */
      assetsDir: "static",
      rollupOptions: {
        output: {
          /**
           * 分块策略
           * 1. 注意这些包名必须存在，否则打包会报错
           * 2. 如果你不想自定义 chunk 分割策略，可以直接移除这段配置
           */
          manualChunks: {
            vue: ["vue", "vue-router", "pinia"],
            element: ["element-plus", "@element-plus/icons-vue"]
          }
        }
      }
    },
    /** 混淆器 */
    esbuild: {
      /** 打包时移除 console.log */
      pure: ["console.log"],
      /** 打包时移除 debugger */
      drop: ["debugger"],
      /** 打包时移除所有注释 */
      legalComments: "none"
    },
    /** Vite 插件 */
    plugins: [
      vue(),
      vueJsx(),
      /** 将 SVG 静态图转化为 Vue 组件 */
      svgLoader({ defaultImport: "url" }),
      /** SVG */
      createSvgIconsPlugin({
        iconDirs: [path.resolve(process.cwd(), "src/icons/svg")],
        symbolId: "icon-[dir]-[name]"
      }),
      /** UnoCSS */
      UnoCSS()
    ]
  };
};
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxVc2Vyc1xcXFwxNDE3OVxcXFxEZXNrdG9wXFxcXHhpYW95dVxcXFx2dWUzXFxcXHhpYW95dWhkY3VzdG9tZXJcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZml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